<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>jQuery UI Slider - Range with fixed maximum</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$( "#slider-range-max" ).slider({
range: "max",
min: 1,
max: 10,
step: .01,
value: 2,
slide: function( event, ui ) {
$( "#amount" ).val( ui.value );
if (ui.value==8)
 $("#slider-range-max").slider('disable'); 
}
});
});
</script>
</head>
<body>
<p>
<label for="amount">Minimum number of bedrooms:</label>
<input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" />
</p>
<div id="slider-range-max"></div>
</body>
</html>